<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>添加账单</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/bootstrap-icons-1.11.3/font/bootstrap-icons.css" rel="stylesheet">
  </head>
  <body>
    <div class="container-sm border mt-3">
      <h1 class="text-center">添加账单</h1>
      <form action="/add" method="post">
        <div class="row mt-3 mb-3">
          <label class="col-sm-1 col-form-label text-end fw-bold" for="title">事项：</label>
          <div class="col-sm-11">
            <input class="form-control" type="text" id="title" name="title" placeholder="请输入">
          </div>
        </div>
        <div class="row mt-3 mb-3">
          <label class="col-sm-1 col-form-label text-end fw-bold" for="time">时间：</label>
          <div class="col-sm-11">
            <input class="form-control" type="date" id="time" name="time" placeholder="请输入">
          </div>
        </div>
        <div class="row mt-3 mb-3">
          <label class="col-sm-1 col-form-label text-end fw-bold" for="type">类型：</label>
          <div class="col-sm-11">
            <select class="form-select" id="type" name="type">
              <option value="-1">支出</option>
              <option value="1">收入</option>
            </select>
          </div>
        </div>
        <div class="row mt-3 mb-3">
          <label class="col-sm-1 col-form-label text-end fw-bold" for="account">金额：</label>
          <div class="col-sm-11">
            <input class="form-control" type="number" id="account" name="account" placeholder="请输入">
          </div>
        </div>
        <div class="row mt-3 mb-3">
          <label class="col-sm-1 col-form-label text-end fw-bold" for="remark">备注：</label>
          <div class="col-sm-11">
            <textarea class="form-control" id="remark" name="remark" rows="3" placeholder="请输入"></textarea>
          </div>
        </div>
        <div class="row mb-3">
          <div class="col text-center">
            <button class="btn btn-primary" type="submit"><i class="bi bi-check2"></i> 提交</button>
            <button type="button" class="btn btn-outline-primary" onclick="back()"><i class="bi bi-arrow-return-right"></i> 返回</button>
          </div>
        </div>
      </form>
    </div>
    <script src="/js/bootstrap.bundle.min.js"></script>
    <script>
      function back() {
        location.href = '/'
      }
    </script>
  </body>
</html>